/* General Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
}

/* Task List Styles */
.task-list-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow-y:auto;
  ::-webkit-scrollbar {
    display: none;
    scrollbar-width: none
  }
  position: relative;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 2px;
}

.task-list-header {
  flex-shrink: 0;
}

.task-list-header h2 {
  margin: 0 0 16px 0;
  color: #333;
}

.task-header {
  display: flex;
  padding: 12px 16px;
  background-color: #f5f5f5;
  border-radius: 4px;
  margin-bottom: 8px;
  font-weight: bold;
}

.task-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  position: relative;
  scrollbar-width: none; /* Firefox */
}

.task-list::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.task-header span,
.task-row span {
  flex: 1;
  text-align: left;
  padding: 0 8px;
}

/* 调整任务ID和品名的宽度 */
.task-id {
  flex: 0.6;
  min-width: 100px;
  max-width: 120px;
}

.product-name {
  flex: 1;
  min-width: 150px;
}

.status {
  flex: 0.6;
  min-width: 80px;
  max-width: 100px;
}

.task-row {
  display: flex;
  padding: 6px 8px;
  align-items: center;
  animation: slideIn 0.3s ease-out;
  position: relative;
  overflow: visible;
  width: 100%;
  box-sizing: border-box;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.task-row.pending {
  background-color: #f0f0f0;
}

.task-row.processing {
  background-color: #ffb74d;
}

.task-row.completed {
  background-color: #81c784;
}

.task-row.terminated {
  animation: fadeInSlide 0.5s ease-out;
}

.terminated-id {
  color: #ff9800 !important;
  font-weight: bold;
}

@keyframes fadeInSlide {
  0% {
    opacity: 0;
    transform: translateX(-100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOutSlide {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(100%);
  }
}

.task-row.exiting {
  animation: fadeOutSlide 0.3s ease-out forwards;
}

.task-id, .product-name, .status, .option, .action {
  flex: 1;
  display: flex;
  align-items: center;
}

.action {
  flex: 1.2;
  justify-content: center;
  min-width: 180px;
  max-width: 200px;
  padding-right: 16px;
}

.action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  width: 100%;
}

.action-button {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.action-button.cancel {
  background-color: #8c8c8c;
}

.action-button.cancel:hover {
  background-color: #a6a6a6;
}

.action-button.terminate {
  background-color: #ff4d4f;
}

.action-button.terminate:hover {
  background-color: #ff7875;
}

.action-button.delete {
  background-color: #ff4d4f;
}

.action-button.delete:hover {
  background-color: #ff7875;
}

.task-row.pending .action-button {
  background-color: #8c8c8c;
}

.task-row.pending .action-button:hover {
  background-color: #a6a6a6;
}

/* 操作列布局 */
.option {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding-right: 10px;
  align-items: center;
  flex: 1.2;
  gap: 8px;
  min-width: 180px;
  max-width: 200px;
  padding-right: 16px;
}

/* 统一按钮基础样式 */
.option-button,
.action-button,
.option .action-button.continue {
  min-width: 70px;
  max-width: 80px;
  padding: 4px 8px;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: all 0.3s ease;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option-button {
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  color: #666;
  margin-left: auto;
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 16px;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  min-width: 150px;
  overflow: visible;
  border: 1px solid #eee;
}

.dropdown-item {
  display: flex;
  width: 100%;
  padding: 8px 15px;
  text-align: left;
  border: none;
  background: none;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 14px;
  align-items: center;
}

.dropdown-item:hover {
  background-color: #f5f5f5;
}

/* Prompt Form Styles */
.prompt-form-overlay {
  position: absolute;
  bottom: 20%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 10px;
  z-index: 1000;
  width: 100%;
  display: flex;
  justify-content: center;
}

.prompt-form {
  background-color: #f8f8ff;
  border-radius: 10px;
  padding: 20px;
  width: 500px;
  position: relative;
}

.prompt-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
}

.prompt-form-header h2 {
  font-size: 18px;
  font-weight: bold;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

.close-button {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  margin-left: auto;
}

.form-group {
  margin-bottom: 5px;
}

.form-group label {
  display: block;
  text-align: left;
  margin-left: 5px;
  font-size: 14px;
}

.form-control {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.prompt-textarea {
  min-height: 80px;
  resize: vertical;
}

.keywords-input-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.keywords-input-group .form-control {
  flex: 1;
}

.add-keyword-button {
  background-color: #4169e1;
  color: white;
  border: none;
  border-radius: 5px;
  width: 30px;
  height: 30px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkbox-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.checkbox-group label {
  min-width: 30px;
  margin-right: 5px;
}

.checkbox {
  margin-left: 10px;
  margin-right: 20px;
}

.slider-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider {
  width: 100%;
  height: 5px;
}

.slider-value {
  min-width: 40px;
  text-align: right;
  font-size: 14px;
  color: #666;
}

.ai-slider {
  accent-color: #ff69b4;
}

.pics-slider {
  accent-color: #4169e1;
}

.form-actions {
  display: flex;
  justify-content: center;
  /* margin-top: 20px; */
}

.upload-button {
  background-color: #00bfa5;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 30px;
  font-size: 16px;
  cursor: pointer;
}

/* Prompt Input Styles */
.prompt-input-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 10px;
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.template-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  justify-content: flex-start;
}

.template-button {
  background-color: #ffd700;
  border: none;
  border-radius: 5px;
  padding: 5px 15px;
  font-size: 14px;
  cursor: pointer;
}

.form-button {
  background-color: #4169e1;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 5px 15px;
  font-size: 14px;
  cursor: pointer;
  margin-left: 10px;
}

.input-area {
  display: flex;
  margin-bottom: 5px;
}

.prompt-input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px 0 0 5px;
  font-size: 14px;
}

.add-button {
  background-color: #00bfa5;
  color: white;
  border: none;
  border-radius: 0 5px 5px 0;
  padding: 10px 20px;
  font-size: 14px;
  cursor: pointer;
}

.help-text {
  text-align: center;
  font-size: 12px;
}

.help-link {
  color: #00bfa5;
  text-decoration: none;
}

/* Confirmation Dialog Styles */
.confirm-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.confirm-dialog {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.confirm-dialog h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
}

.confirm-dialog p {
  margin: 0 0 20px 0;
  color: #666;
}

.confirm-dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.confirm-dialog button {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.confirm-dialog .confirm-button {
  background-color: #ff4d4f;
  color: white;
}

.confirm-dialog .confirm-button:hover {
  background-color: #ff7875;
}

.confirm-dialog .cancel-button {
  background-color: #f0f0f0;
  color: #666;
}

.confirm-dialog .cancel-button:hover {
  background-color: #e0e0e0;
}

.action-button.continue {
  background-color: #1890ff;
  color: white;
  transition: all 0.3s ease;
}

.action-button.continue:hover {
  background-color: #40a9ff;
}